﻿// --------------------------------------------------------------------------------------
// 	文 件 名: mtStruct_Image.cs
// --------------------------------------------------------------------------------------
// 	创建时间: 2021/12/08
// 	版　　本: Version:  1.0.0
// 	版    权: Copyright (C) 2007 - 2021 NUCTECH All Rights Reserved
// 	作    者: chenyu
// --------------------------------------------------------------------------------------
// 	说    明: MTS - 数据结构定义。
// --------------------------------------------------------------------------------------
// 	修改历史:
// 			日期							改动
//		2021.12.08						  创建模块
// --------------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Text;
using SH;


namespace MTS
{
	using shVectorU2 = shVector2<uint>;

	public class mtPicCriteria : mtObject, shISerializeable
	{
		uint m_begin = 0;                            //查询的其实位置，必须填
		uint m_limit = 0;                            //查询的数量限制，必须填，且不能大于1000

		ulong m_scan_start_time = 0;                 //扫描开始时间，0代表任何开始时间
		ulong m_scan_end_time = 0;                  //扫描结束时间，0代表任何结束时间
		List<uint> m_operator_ids = new List<uint>();             //操作员id，可不填
		List<emScanType> m_scan_types = new List<emScanType>();           //扫描模式，1，快速，2标准，不填代表所有
		List<emCargoType> m_cargo_types = new List<emCargoType>();     //箱体类型，1，Q7 ，2，W2，不填代表所有
		ulong m_judge_start_time = 0;                //判图开始时间，0代表任何开始时间
		ulong m_judge_end_time = 0;                 //判图结束时间，0代表任何结束时间
		List<uint> m_judge_ids = new List<uint>();                //判图员id,整形数组，可不填
		List<emConclusion> m_judge_results = new List<emConclusion>();  //判图结论，0，安全，1嫌疑，可不填
		ulong m_check_start_time = 0;               //检查开始时间 ，0代表任何开始时间
		ulong m_check_end_time = 0;                 //检查结束时间，0代表任何结束时间
		List<uint> m_inspector_ids = new List<uint>();            //检查员id ，可不填
		List<emConclusion> m_check_results = new List<emConclusion>();      //检查结论, 无限制，0、安全，1，嫌疑
		List<uint> m_rcg_types = new List<uint>();           //自动识别类型，整形数组，爆炸物、毒品、水银，奶粉
										  //List <emConclusion> m_rcg_results;

		//-Added by gaoyang2.  2019/10/24 0:16:58  Detail:
		List<uint> m_lock_statuses = new List<uint>();       //图像锁定状态 0未锁定  1锁定
		List<uint> m_save_statuses = new List<uint>();       //图像保存状态 0自动保存  1手动保存

		ulong m_confirm_start_time = 0;             //确认开始时间 ，0代表任何开始时间
		ulong m_confirm_end_time = 0;               //确认结束时间，0代表任何结束时间
		List<uint> m_confirm_ids = new List<uint>();              //确认员id ，可不填
		List<emConclusion> m_confirm_results = new List<emConclusion>();    //确认结论
		List<emConclusion> m_auto_results = new List<emConclusion>();       //自动结论

		public	mtPicCriteria()
			: base(0)
		{

		}

        public uint Begin { get => m_begin; set => m_begin = value; }
        public uint Limit { get => m_limit; set => m_limit = value; }
        public ulong ScanStartTime { get => m_scan_start_time; set => m_scan_start_time = value; }
        public ulong ScanEndTime { get => m_scan_end_time; set => m_scan_end_time = value; }
        public List<uint> OperatorIds { get => m_operator_ids; set => m_operator_ids = value; }
        public List<emScanType> ScanTypes { get => m_scan_types; set => m_scan_types = value; }
        public List<emCargoType> CargoTypes { get => m_cargo_types; set => m_cargo_types = value; }
        public ulong JudgeStartTime { get => m_judge_start_time; set => m_judge_start_time = value; }
        public ulong JudgeEndTime { get => m_judge_end_time; set => m_judge_end_time = value; }
        public List<uint> JudgeIds { get => m_judge_ids; set => m_judge_ids = value; }
        public List<emConclusion> JudgeResults { get => m_judge_results; set => m_judge_results = value; }
        public ulong CheckStartTime { get => m_check_start_time; set => m_check_start_time = value; }
        public ulong CheckEndTime { get => m_check_end_time; set => m_check_end_time = value; }
        public List<uint> InspectorIds { get => m_inspector_ids; set => m_inspector_ids = value; }
        public List<emConclusion> CheckResults { get => m_check_results; set => m_check_results = value; }
        public List<uint> RcgTypes { get => m_rcg_types; set => m_rcg_types = value; }
        public List<uint> LockStatuses { get => m_lock_statuses; set => m_lock_statuses = value; }
        public List<uint> SaveStatuses { get => m_save_statuses; set => m_save_statuses = value; }
        public ulong ConfirmStartTime { get => m_confirm_start_time; set => m_confirm_start_time = value; }
        public ulong ConfirmEndTime { get => m_confirm_end_time; set => m_confirm_end_time = value; }
        public List<uint> ConfirmIds { get => m_confirm_ids; set => m_confirm_ids = value; }
        public List<emConclusion> ConfirmResults { get => m_confirm_results; set => m_confirm_results = value; }
        public List<emConclusion> AutoResults { get => m_auto_results; set => m_auto_results = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_begin);
			sc.serialize(ref m_limit);
			sc.serialize(ref m_scan_start_time);
			sc.serialize(ref m_scan_end_time);
			sc.serialize(ref m_judge_start_time);
			sc.serialize(ref m_judge_end_time);
			sc.serialize(ref m_check_start_time);
			sc.serialize(ref m_check_end_time);
			sc.serialize(ref m_operator_ids);
			sc.serialize(ref m_scan_types);
			sc.serialize(ref m_cargo_types);
			sc.serialize(ref m_judge_ids);
			sc.serialize(ref m_judge_results);
			sc.serialize(ref m_inspector_ids);
			sc.serialize(ref m_check_results);
			sc.serialize(ref m_rcg_types);
			sc.serialize(ref m_lock_statuses);
			sc.serialize(ref m_save_statuses);

			sc.serialize(ref m_confirm_start_time);
			sc.serialize(ref m_confirm_end_time);
			sc.serialize(ref m_confirm_ids);
			sc.serialize(ref m_confirm_results);
			sc.serialize(ref m_auto_results);

			return sc;
		}

        #region 方法改为属性
        //public void SetQueryRange(uint beg, uint limit) { m_begin = beg; m_limit = limit; }
        //public uint BeginPos() { return m_begin; }
        //public uint Limit() { return m_limit; }

        //public void SetScanTimeQueryRange(ulong scanStart, ulong scanEnd) { m_scan_start_time = scanStart; m_scan_end_time = scanEnd; }
        //public ulong ScanStartTime() { return m_scan_start_time; }
        //public ulong ScanEndTime() { return m_scan_end_time; }

        //public void OperatorIds(uint opId) { m_operator_ids.Add(opId); }
        //public void OperatorIds(List<uint> opIds) { m_operator_ids = opIds; }
        //public List<uint> OperatorIds() { return m_operator_ids; }

        //public void ScanTypes(emScanType scanType) { m_scan_types.Add(scanType); }
        //public void ScanTypes(List<emScanType> scanTypes) { m_scan_types = scanTypes; }
        //public List<emScanType> ScanTypes() { return m_scan_types; }

        //public void CargoTypes(emCargoType cargoType) { m_cargo_types.Add(cargoType); }
        //public void CargoTypes(List<emCargoType> cargoTypes) { m_cargo_types = cargoTypes; }
        //public List<emCargoType> CargoTypes() { return m_cargo_types; }

        //public void SetJudgeTimeQueryRange(ulong judgeStart, ulong judgeEnd) { m_judge_start_time = judgeStart; m_judge_end_time = judgeEnd; }
        //public ulong JudgeStartTime() { return m_judge_start_time; }
        //public ulong JudgeEndTime() { return m_judge_end_time; }

        //public void JudgeIds(uint juId) { m_judge_ids.Add(juId); }
        //public void JudgeIds(List<uint> juIds) { m_judge_ids = juIds; }
        //public List<uint> JudgeIds() { return m_judge_ids; }

        //public void JudgeResults(emConclusion judgeRusult) { m_judge_results.Add(judgeRusult); }
        //public void JudgeResults(List<emConclusion> judgeRusults) { m_judge_results = judgeRusults; }
        //public List<emConclusion> JudgeResults() { return m_judge_results; }

        //public void SetCheckTimeQueryRange(ulong checkStart, ulong checkEnd) { m_check_start_time = checkStart; m_check_end_time = checkEnd; }
        //public ulong CheckStartTime() { return m_check_start_time; }
        //public ulong CheckEndTime() { return m_check_end_time; }

        //public void InspectorIds(uint inId) { m_inspector_ids.Add(inId); }
        //public void InspectorIds(List<uint> inIds) { m_inspector_ids = inIds; }
        //public List<uint> InspectorIds() { return m_inspector_ids; }

        //public void CheckResults(emConclusion checkRusult) { m_check_results.Add(checkRusult); }
        //public void CheckResults(List<emConclusion> checkRusults) { m_check_results = checkRusults; }
        //public List<emConclusion> CheckResults() { return m_check_results; }

        //public void RcgTypes(uint rcgType) { m_rcg_types.Add(rcgType); }
        //public void RcgTypes(List<uint> rcgTypes) { m_rcg_types = rcgTypes; }
        //public List<uint> RcgTypes() { return m_rcg_types; }

        //public void LockStatuses(uint lockStatus) { m_lock_statuses.Add(lockStatus); }
        //public void LockStatuses(List<uint> lock_statuses) { m_lock_statuses = lock_statuses; }
        //public List<uint> LockStatuses() { return m_lock_statuses; }

        //public void SaveStatuses(uint status) { m_save_statuses.Add(status); }
        //public void SaveStatuses(List<uint> vecStatus) { m_save_statuses = vecStatus; }
        //public List<uint> SaveStatuses() { return m_save_statuses; }

        //public ulong ConfirmStartTime() { return m_confirm_start_time; }
        //public ulong ConfirmEndTime() { return m_confirm_end_time; }

        //public void ConfirmStartTime(ulong n) { m_confirm_start_time = n; }
        //public void ConfirmEndTime(ulong n) { m_confirm_end_time = n; }

        //public void ConfirmIds(uint id) { m_confirm_ids.Add(id); }
        //public void ConfirmIds(List<uint> ids) { m_confirm_ids = ids; }

        //public List<uint> ConfirmIds() { return m_confirm_ids; }

        //public void ConfirmResults(emConclusion c) { m_confirm_results.Add(c); }
        //public void ConfirmResults(List<emConclusion> c) { m_confirm_results = c; }
        //public List<emConclusion> ConfirmResults() { return m_confirm_results; }

        //public void AutoResults(emConclusion c) { m_auto_results.Add(c); }
        //public void AutoResults(List<emConclusion> c) { m_auto_results = c; }
        //public List<emConclusion> AutoResults() { return m_auto_results; }
        #endregion


    }
	
	public class mtPicinfo : mtObject, shISerializeable
	{
		ulong m_pic_id;
		string m_prn;
		//string m_dev_id;
		emScanType m_scan_type = emScanType.emScanType_Unknown;
		emCargoType m_cargo_type = emCargoType.emCT_Unknown;
		ulong m_scan_time = 0;
		string m_operator_id;

		ulong m_judge_time = 0;
		emConclusion m_judge_result = emConclusion.emSC_Unknown;
		string m_judge_id;

		ulong m_check_time = 0;
		emConclusion m_check_result = emConclusion.emSC_Unknown;
		string m_inspector_id;

		ulong m_confirm_time = 0;
		emConclusion m_confirm_result = emConclusion.emSC_Unknown;
		string m_confirmer_id;

		List<uint> m_rcg_types=new List<uint>();

		//string m_image_path;

		//-Added by gaoyang2.  2019/10/24 0:16:58  Detail:
		uint m_lock_status = 0;                      //图像锁定状态 0未锁定  1锁定
		uint m_save_status = 0;                      //图像保存状态 0自动保存  1手动保存
		emConclusion m_auto_result;
		public	mtPicinfo()
				: base(0)
		{
		}

        public ulong PicId { get => m_pic_id; set => m_pic_id = value; }
        public string Prn { get => m_prn; set => m_prn = value; }
        public emScanType ScanType { get => m_scan_type; set => m_scan_type = value; }
        public emCargoType CargoType { get => m_cargo_type; set => m_cargo_type = value; }
        public ulong ScanTime { get => m_scan_time; set => m_scan_time = value; }
        public string OperatorId { get => m_operator_id; set => m_operator_id = value; }
        public ulong JudgeTime { get => m_judge_time; set => m_judge_time = value; }
        public emConclusion JudgeResult { get => m_judge_result; set => m_judge_result = value; }
        public string JudgeId { get => m_judge_id; set => m_judge_id = value; }
        public ulong CheckTime { get => m_check_time; set => m_check_time = value; }
        public emConclusion CheckResult { get => m_check_result; set => m_check_result = value; }
        public string InspectorId { get => m_inspector_id; set => m_inspector_id = value; }
        public ulong ConfirmTime { get => m_confirm_time; set => m_confirm_time = value; }
        public emConclusion ConfirmResult { get => m_confirm_result; set => m_confirm_result = value; }
        public string ConfirmerId { get => m_confirmer_id; set => m_confirmer_id = value; }
        public List<uint> RcgTypes { get => m_rcg_types; set => m_rcg_types = value; }
        public uint LockStatus { get => m_lock_status; set => m_lock_status = value; }
        public uint SaveStatus { get => m_save_status; set => m_save_status = value; }
        public emConclusion AutoResult { get => m_auto_result; set => m_auto_result = value; }

		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_pic_id);
			sc.serialize(ref m_prn);
			//	sc.serialize(m_dev_id);
			sc.serialize(ref m_scan_type);
			sc.serialize(ref m_cargo_type);
			sc.serialize(ref m_scan_time);
			sc.serialize(ref m_operator_id);
			sc.serialize(ref m_judge_time);
			sc.serialize(ref m_judge_result);
			sc.serialize(ref m_judge_id);
			sc.serialize(ref m_check_time);
			sc.serialize(ref m_check_result);
			sc.serialize(ref m_inspector_id);
			sc.serialize(ref m_confirm_time);
			sc.serialize(ref m_confirm_result);
			sc.serialize(ref m_confirmer_id);
			sc.serialize(ref m_rcg_types);
			sc.serialize(ref m_lock_status);
			sc.serialize(ref m_save_status);
			sc.serialize(ref m_auto_result);
			return sc;
		}

        #region 改为属性
        //public string ImagePath() { return m_prn; }
        //public List<uint> RcgTypes() { return m_rcg_types; }

        //public ulong ImageID() { return m_pic_id; }
        ////	 string  DeviceID()  { return m_dev_id; }
        //public emScanType ScanMode() { return m_scan_type; }
        //public string Operator() { return m_operator_; }
        //public string Inspector() { return m_inspector_; }
        //public string Judge() { return m_judge_; }
        //public string Confirmer() { return m_confirmer_; }
        //public ulong ScanTime() { return m_scan_time; }
        //public ulong JudgeTime() { return m_judge_time; }
        //public ulong CheckTime() { return m_check_time; }
        //public ulong ConfirmTime() { return m_confirm_time; }
        //public emConclusion CheckResult() { return m_check_result; }
        //public emConclusion JudgeResult() { return m_judge_result; }
        //public emConclusion ConfirmResult() { return m_confirm_result; }
        //public emCargoType CargoType() { return m_cargo_type; }
        //public uint LockStatus() { return m_lock_status; }
        //public uint SaveStatus() { return m_save_status; }

        //public void ImagePath(string prn) { m_prn = prn; }
        //public void RcgTypes(uint rcgType) { m_rcg_types.Add(rcgType); }
        //public void RcgTypes(List<uint> rcgTypes) { m_rcg_types = rcgTypes; }

        //public void ImageID(ulong pidId) { m_pic_id = pidId; }
        ////	void DeviceID( string  devId)  {  m_dev_id = devId; }
        //public void ScanMode(emScanType scanType) { m_scan_type = scanType; }
        //public void Operator(string op) { m_operator_ = op; }
        //public void Inspector(string i) { m_inspector_ = i; }
        //public void Judge(string ju) { m_judge_ = ju; }
        //public void Confirmer(string cf) { m_confirmer_ = cf; }
        //public void ScanTime(ulong scanTime) { m_scan_time = scanTime; }
        //public void JudgeTime(ulong judgeTime) { m_judge_time = judgeTime; }
        //public void CheckTime(ulong checkTime) { m_check_time = checkTime; }
        //public void ConfirmTime(ulong confirmTime) { m_confirm_time = confirmTime; }
        //public void CheckResult(emConclusion checkResult) { m_check_result = checkResult; }
        //public void JudgeResult(emConclusion judgeResult) { m_judge_result = judgeResult; }
        //public void ConfirmResult(emConclusion confirmResult) { m_confirm_result = confirmResult; }
        //public void CargoType(emCargoType cargoType) { m_cargo_type = cargoType; }
        //public void LockStatus(uint status) { m_lock_status = status; }
        //public void SaveStatus(uint status) { m_save_status = status; }

        //public emConclusion AutoResult() { return m_auto_result; }
        //public void AutoResult(emConclusion c) { m_auto_result = c; }
        #endregion
    }
	
	
	public class mtJudgeResult : mtObject, shISerializeable
	{
		string m_dev_id;
		string m_prn;

		emConclusion m_judge_result = emConclusion.emSC_Unknown;
		ulong m_judge_time = 0;

		public	mtJudgeResult()
				: base(0)
		{
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_prn);
			sc.serialize(ref m_dev_id);
			sc.serialize(ref m_judge_result);
			sc.serialize(ref m_judge_time);
			return sc;
		}

		public ulong JudgeTime() { return m_judge_time; }
		public void JudgeTime(ulong judgeTime) { m_judge_time = judgeTime; }

		public emConclusion Result() { return m_judge_result; }
		public void Result(emConclusion nResult) { m_judge_result = nResult; }

		public new string DeviceID() { return m_dev_id; }
		public string ImageID() { return m_prn; }

		public new void DeviceID(string devId) { m_dev_id = devId; }
		public void ImageID(string prn) { m_prn = prn; }
	};

	public class mtScanNumerical : mtObject, shISerializeable
	{
		uint m_nCurNum = 0;
		uint m_nTodayNum = 0;
		uint m_nTotalNum = 0;
		uint m_nCurSusNum = 0;
		uint m_nTodaySusNum = 0;
		uint m_nTotalSusNum = 0;

		public	mtScanNumerical()
				: base(0)
		{
		}

		public mtScanNumerical(uint nTodayNum, uint nTotalNum, uint nTodaySusNum, uint nTotalSusNum)
				: base(0)
		{
			m_nCurNum=0;
			m_nTotalNum= nTotalNum;
			m_nCurSusNum=0;
			m_nTotalSusNum= nTotalSusNum;
			m_nTodayNum=nTodayNum;
			m_nTodaySusNum= nTodaySusNum;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nCurNum);
			sc.serialize(ref m_nTotalNum);
			sc.serialize(ref m_nCurSusNum);
			sc.serialize(ref m_nTotalSusNum);
			sc.serialize(ref m_nTodayNum);
			sc.serialize(ref m_nTodaySusNum);

			return sc;
		}

		public void Clear() { m_nCurSusNum = 0; m_nCurNum = 0; m_nTodayNum = 0; m_nTodaySusNum = 0; m_nTotalNum = 0; m_nTotalSusNum = 0; }
		public uint CurNum { get => m_nCurNum; set => m_nCurNum = value; }
		public uint TodayNum { get => m_nTodayNum; set => m_nTodayNum = value; }
		public uint TotalNum { get => m_nTotalNum; set => m_nTotalNum = value; }

		public uint CurSusNum { get => m_nCurSusNum; set => m_nCurSusNum = value; }
		public uint TodaySusNum { get => m_nTodaySusNum; set => m_nTodaySusNum = value; }

		public uint TotalSusNum { get => m_nTotalSusNum; set => m_nTotalSusNum = value; }

		
	};

	public class mtImageRequest : mtObject, shISerializeable
	{
		string m_prn;

		//   MiuSingle	= 0x0001,
		//   MiuLow     = 0x0002,		//单能数据
		//	 MiuHigh    = 0x0004,		//双能数据
		//	 Gray       = 0x0100,		//灰度数据
		//	 Material	= 0x0200,		//材料数据
		uint m_nDrDataTypeMask = 0;

		//   MiuSingle	= 0x0001,
		//   MiuLow     = 0x0002,		//单能数据
		//	 MiuHigh    = 0x0004,		//双能数据
		//	 Gray       = 0x0100,		//灰度数据
		//	 Material	= 0x0200,		//材料数据
		uint m_nImgDataTypeMask = 0;

		//	MiuSingle = 0x0001,
		//	MiuLow	  = 0x0002,		//单能数据
		//	MiuHigh	  = 0x0004,		//双能数据
		//	Density   = 0x0010,		//密度数据
		//	Atomic    = 0x0020,		//原子序数数据
		//	Gray      = 0x0100,		//灰度数据
		//	Material  = 0x0200,		//材料数据
		//	Map       = 0x1000,
		//	Map3D     = 0x2000,
		uint m_nHelDataTypeMask = 0;

		//V1视角  0x0001
		//V2视角  0x0002
		uint m_nDrImageTypeMask = 0;

		bool m_bTsp = false;
		bool m_bSus = false;
		bool m_bMap = false;

		bool m_bJudgeXml = false;
		bool m_bCargoXml = false;

		bool m_bDRImage = false;
		bool m_bCTImage = false;
		bool m_bTspImage = false;
		bool m_b3DImage = false;
		bool m_bCheckPicture = false;
		bool m_bCargoPicture = false;
		bool m_bAllPicture = false;

		public mtImageRequest()
			: base(0) { 
		}

		public mtImageRequest(string prn)
			: base(0)

		{
			m_prn = prn;
		}

		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_prn);
			sc.serialize(ref m_nDrDataTypeMask);
			sc.serialize(ref m_nImgDataTypeMask);
			sc.serialize(ref m_nHelDataTypeMask);
			sc.serialize(ref m_nDrImageTypeMask);
			sc.serialize(ref m_bTsp);
			sc.serialize(ref m_bSus);
			sc.serialize(ref m_bMap);
			sc.serialize(ref m_bJudgeXml);
			sc.serialize(ref m_bCargoXml);
			sc.serialize(ref m_bDRImage);
			sc.serialize(ref m_bCTImage);
			sc.serialize(ref m_bTspImage);
			sc.serialize(ref m_b3DImage);
			sc.serialize(ref m_bAllPicture);
			sc.serialize(ref m_bCheckPicture);
			sc.serialize(ref m_bCargoPicture);

			return sc;
		}
	};

	public class mtImageData : mtObject, shISerializeable
	{
		shBlob m_data = new shBlob();
		shVectorU2 m_v2Size = new shVectorU2();

		byte m_nBBP = 0x04;
		//emIvDT_DR = 0x0001,
		//emIvDT_TSP = 0x0002,
		//emIvDT_3D = 0x0004,
		//emIvDT_CT = 0x0008,
		uint m_nImageTypeMask = 0;

		// 0x00 null
		// 0x01 bmp
		// 0x02 jpg
		// 0x03 png
		// 0x04 gif

		uint m_nFormat = 0;

		string m_strImageBase64;

		public	mtImageData()
				: base(0)
		{
		}

		public mtImageData(shVectorU2 v2Size, uint nImageTypeMask, uint nFormat, byte nBBP, shBlob blob, string strImageBase64 = "")
				: base(0)

		{
			m_nImageTypeMask=nImageTypeMask;
			m_nBBP=nBBP;
		 	m_v2Size=v2Size;
			 m_nFormat=nFormat;
			 m_data = blob;
			m_strImageBase64 = strImageBase64;
		}



		public mtImageData(shVectorU2 v2Size, uint nImageTypeMask, uint nFormat, byte nBBP, byte[] pBuf, string strImageBase64 = "")
				: base(0)
		{
			m_nImageTypeMask = nImageTypeMask;
			m_nBBP = nBBP;
			m_v2Size = v2Size;
			m_nFormat = nFormat;
			m_data.setData(pBuf, v2Size.X * v2Size.Y * nBBP);
			m_strImageBase64 = strImageBase64;
		}

		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(m_v2Size);
			sc.serialize(ref m_nImageTypeMask);
			sc.serialize(m_data);
			sc.serialize(ref m_nBBP);
			sc.serialize(ref m_nFormat);
			sc.serialize(ref m_strImageBase64);

			return sc;
		}

		public uint Format() { return m_nFormat; }
		public void Format(uint nFormat) { m_nFormat = nFormat; }

		public byte BBP() { return m_nBBP; }
		public void BBP(byte nBBP) { m_nBBP = nBBP; }
		public uint Width() { return m_v2Size.X; }
		public uint Height() { return m_v2Size.Y; }

		public bool IsTsp() {
			return (m_nImageTypeMask & 0x0002) != 0;
		}

		public bool IsDR() {
			return (m_nImageTypeMask & 0x0001) != 0;
		}

		public bool Is3D() {
			return (m_nImageTypeMask & 0x0003) != 0;
		}

		public void ImageTypeMask(uint nImageTypeMask) { m_nImageTypeMask = nImageTypeMask; }

		public uint ImageTypeMask() { return m_nImageTypeMask; }

		public void SetData(shVectorU2 v2Size, shBlob data)
		{
			m_v2Size = v2Size;
			m_data = data;
		}

		public void SetData(uint nWidth, uint nHeight, shBlob data)
		{
			m_v2Size.X = nWidth;
			m_v2Size.Y = nHeight;
			m_data = data;
		}

		public shBlob GetData() { return m_data; }

		public byte[] GetBuf() { return m_data.GetData(); }

		public void ImageBase64(string strImageBase64) { m_strImageBase64 = strImageBase64; }

		public string ImageBase64() { return m_strImageBase64; }
	};

	public class mtImageResponse : mtObject, shISerializeable
	{
		string m_prn;
		emCargoType m_cargoType = emCargoType.emCT_Unknown;
		emEnergyType m_energyType = emEnergyType.emET_Unknown;
		uint m_nDrDataTypeMask = 0;
		uint m_nDrgFileNum = 0;
		uint m_nDrgDataNum = 0;

		uint m_nImgDataTypeMask = 0;
		uint m_nImgFileNum = 0;
		uint m_nImgDataNum = 0;

		uint m_nHelDataTypeMask = 0;
		uint m_nHelixFileNum = 0;
		uint m_nHelixSliceNum = 0;
		uint m_nDrImageView = 0;
		List<string> m_vecHelixFileName = new List<string>();

		bool m_bTsp = false;

		bool m_bSus = false;
		bool m_bMap = false;
		uint m_nSusNum = 0; 

		bool m_bJudgeXml = false;
		bool m_bCargoXml = false;

		bool m_bDRImage = false;
		bool m_bCTImage = false;
		bool m_bTspImage = false;
		bool m_b3DImage = false;
		bool m_bCargoImage = false;
		mtImageData m_imageData = new mtImageData();

		public	mtImageResponse()
			: base(0)
		{
		}

		public mtImageResponse(string prn)
			: base(0)
		{
			m_prn = prn;
		}

		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_prn);
			sc.serialize(ref m_nDrDataTypeMask);
			sc.serialize(ref m_nImgDataTypeMask);
			sc.serialize(ref m_nHelDataTypeMask);
			sc.serialize(ref m_cargoType);
			sc.serialize(ref m_energyType);
			sc.serialize(ref m_nDrgFileNum);
			sc.serialize(ref m_nImgFileNum);
			sc.serialize(ref m_nHelixFileNum);
			sc.serialize(ref m_nDrImageView);
			sc.serialize(ref m_vecHelixFileName);
			sc.serialize(ref m_nDrgDataNum);
			sc.serialize(ref m_nImgDataNum);
			sc.serialize(ref m_nHelixSliceNum);
			sc.serialize(ref m_nSusNum);
			sc.serialize(ref m_bTsp);
			sc.serialize(ref m_bSus);
			sc.serialize(ref m_bMap);
			sc.serialize(ref m_bJudgeXml);
			sc.serialize(ref m_bCargoXml);
			sc.serialize(ref m_bDRImage);
			sc.serialize(ref m_bCTImage);
			sc.serialize(ref m_bTspImage);
			sc.serialize(ref m_b3DImage);
			sc.serialize(ref m_bCargoImage);
			m_imageData.serialize(sc);
			return sc;
		}
	};

	public class mtManualSave : mtObject, shISerializeable
	{
		string m_prn;
		ulong m_nImageId = 0;
		ulong m_SaveTime = 0;

		public	mtManualSave()
			: base(0)
		{
		}

		public mtManualSave(string prn)
			: base(0)
		{
			m_prn = prn;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_prn);
			sc.serialize(ref m_nImageId);
			sc.serialize(ref m_SaveTime);

			return sc;
		}
	};

	public class mtDeleteImageRequest : mtObject, shISerializeable
	{
		List<string> m_vecPrn = new List<string>();
		uint m_nSaveType = 0; // 0，自动，1，手动

		public	mtDeleteImageRequest()
			: base(0)

		{
		}

		public mtDeleteImageRequest(List<string> vecPrn, uint nSaveType)
			: base(0)
		{
			m_vecPrn = vecPrn;
			m_nSaveType = nSaveType;
		}

        public List<string> Prn { get => m_vecPrn; set => m_vecPrn = value; }
        public uint SaveType { get => m_nSaveType; set => m_nSaveType = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_vecPrn);
			sc.serialize(ref m_nSaveType);
			return sc;
		}
	}
	public class mtDeleteImageResponse : mtObject, shISerializeable
	{
		List<string> m_vecPrn = new List<string>();
		List<shErrorCode> m_vecErrorCode= new List<shErrorCode>();

		public	mtDeleteImageResponse()
			: base(0)
		{
		}

		public mtDeleteImageResponse(List<string> vecPrn, List<shErrorCode> vecErrorCode)
			: base(0)
		
		{
			m_vecPrn = vecPrn;
			 m_vecErrorCode=vecErrorCode;
		}

        public List<string> Prn { get => m_vecPrn; }
        public List<shErrorCode> ErrorCode { get => m_vecErrorCode; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_vecPrn);
			sc.serialize(ref m_vecErrorCode);
			return sc;
		}

		public void Add(List<string> prns)
		{
            m_vecPrn.AddRange(prns);
        }

		public void Add(shErrorCode errorCode)
		{
			m_vecErrorCode.Add(errorCode);
		}
	}
	public class mtStorageCapacityInfo : mtObject, shISerializeable
	{
		double m_fTotal = 0.0d;
		double m_fRemainder =0.0d;

		public	mtStorageCapacityInfo()
			: base(0)
		{
		}

		public mtStorageCapacityInfo(double fTotal, double fRemainder)
			: base(0)
		{
			m_fTotal = fTotal;
			m_fRemainder = fRemainder;
		}


	public new	shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_fTotal);
			sc.serialize(ref m_fRemainder);

			return sc;
		}
	};

	/*-----------------------------------------磁盘容量------------------------------------------------*/
	// -add by tangyetao   2020/05/11
	public class mtDiskSpace : mtObject, shISerializeable   // 磁盘空间容量
	{
		bool m_bUsed = false;                               // 该条件是否被选择
		uint m_nDiskspace = 65;                          // 已使用的大小占总容量的百分比，此处是扩大100倍后的值，例如已经使用了60%，则该变量的值就是60

        public bool IsUsed { get => m_bUsed; set => m_bUsed = value; }
        public uint Diskspace { get => m_nDiskspace; set => m_nDiskspace = value; }

        public	mtDiskSpace()
				: base(0)
		{
		}

		public mtDiskSpace(bool bUsed, uint nDiskspace)
				: base(0)

		{
			m_bUsed = bUsed;
			m_nDiskspace = nDiskspace;
		}


        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_bUsed);
			sc.serialize(ref m_nDiskspace);

			return sc;
		}
	}
	/*-----------------------------------------图像保存的最小数量------------------------------------------------*/
	// -add by tangyetao   2020/05/11
	public class mtReserveImageNum : mtObject, shISerializeable    // 至少保存的图像数量
	{
		bool m_bUsed = false;                                   // 该条件是否被选择
		uint m_nReserveImageNum = 1;                        // 保存的最小图像数量 默认至少保存1份

        public bool IsUsed { get => m_bUsed; set => m_bUsed = value; }
        public uint ReserveImageNum { get => m_nReserveImageNum; set => m_nReserveImageNum = value; }

        public	mtReserveImageNum()
				: base(0)
		{
		}

		public mtReserveImageNum(bool bUsed, uint nReserveImageNum)
				: base(0)

		{
			m_bUsed = bUsed;
			m_nReserveImageNum = nReserveImageNum;
		}

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_bUsed);
			sc.serialize(ref m_nReserveImageNum);

			return sc;
		}
	}
	/*-----------------------------------------图像保存的最短时间------------------------------------------------*/
	// -add by tangyetao   2020/05/11
	public class mtReserveImageSavedTime : mtObject, shISerializeable // 图像保存的最短时间
	{
		bool m_bUsed = false;                                   // 该条件是否被选择
		uint m_nImgSavedDay = 1;                                // 图像保存的最短时间，单位为天 默认保存1天内的数据

        public bool IsUsed { get => m_bUsed; set => m_bUsed = value; }
        public uint ImgSavedDay { get => m_nImgSavedDay; set => m_nImgSavedDay = value; }

        public	mtReserveImageSavedTime()
				: base(0)                         // 
		{
		}

		public mtReserveImageSavedTime(bool bUsed, uint nReserveImageNum)
				: base(0)

		{
			m_bUsed = bUsed;
			m_nImgSavedDay = nReserveImageNum;
		}

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_bUsed);
			sc.serialize(ref m_nImgSavedDay);

			return sc;
		}
	}
	/*-----------------------------------------图像清理使用的结构体-----------------------------------------------*/
	// -add by tangyetao   2020/05/11

	/*class mtImageClearParam : mtObject	, shISerializeable		// 图像清理使用的参数
	{
		bool							m_bClearOpen;			// 功能是否打开
		mtDiskSpace						m_startClearDiskSpace;	// 当磁盘剩余容量到m_clearDiskSpace%时，开始自动清理
		mtDiskSpace						m_finishClearDiskSpace;	// 当磁盘剩余容量到m_clearDiskSpace%时，开始自动清理
		mtReserveImageNum				m_reserveImgNum;		// 保留前m_reserveImgNum个图像数据
		mtReserveImageSavedTime			m_reserveSavedTime;		// 保留前m_reserveSavedTime天的图像数据
		emDeleteLevel					m_emDeleteLevel;			// 删除文件的级别
	public
		mtImageClearParam()
			: base(0)
			, m_bClearOpen(true)
			, m_emDeleteLevel(emDeleteLevel_All)
		{
		}

		mtImageClearParam(bool bUsed, mtDiskSpace	clearDiskSpace, mtReserveImageNum reserveImgNum, mtReserveImageSavedTime clearSavedTime, emDeleteLevel nDeleteLevel)
			: base(0)
			, m_bClearOpen(true)
			, m_emDeleteLevel(nDeleteLevel)
		{
			m_clearDiskSpace	= clearDiskSpace;
			m_reserveImgNum		= reserveImgNum;
			m_reserveSavedTime	= clearSavedTime;
		}

		mtImageClearParam( mtImageClearParam  other)
			: mtObject(other)
			, m_bClearOpen(other.m_bClearOpen)
			, m_emDeleteLevel(other.m_emDeleteLevel)
		{
			m_clearDiskSpace	= other.m_clearDiskSpace;
			m_reserveImgNum		= other.m_reserveImgNum;
			m_reserveSavedTime	= other.m_reserveSavedTime;
		}

		mtImageClearParam(mtImageClearParam   other)
			: mtObject(other)
			, m_bClearOpen(other.m_bClearOpen)
			, m_emDeleteLevel(other.m_emDeleteLevel)
		{
			m_clearDiskSpace	= std::move(other.m_clearDiskSpace);
			m_reserveImgNum		= std::move(other.m_reserveImgNum);
			m_reserveSavedTime	= std::move(other.m_reserveSavedTime);
		}

		mtImageClearParam  operator = ( mtImageClearParam  other)
		{
			if (this !=  other)
			{
				base.operator=(other);
				m_bClearOpen		= other.m_bClearOpen;
				m_emDeleteLevel		= other.m_emDeleteLevel;
				m_clearDiskSpace	= other.m_clearDiskSpace;
				m_reserveImgNum		= other.m_reserveImgNum;
				m_reserveSavedTime	= other.m_reserveSavedTime;
			}

			return *this;
		}

		mtImageClearParam  operator = (mtImageClearParam   other)
		{
			if (this !=  other)
			{
				base.operator=(std::move(other));
				m_bClearOpen		= other.m_bClearOpen;
				m_emDeleteLevel		= other.m_emDeleteLevel;
				m_clearDiskSpace	= std::move(other.m_clearDiskSpace);
				m_reserveImgNum		= std::move(other.m_reserveImgNum);
				m_reserveSavedTime	= std::move(other.m_reserveSavedTime);
			}

			return *this;
		}


			shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(m_bClearOpen);
			sc.serialize(m_emDeleteLevel);
			sc.serialize(m_clearDiskSpace);
			sc.serialize(m_reserveImgNum);
			sc.serialize(m_reserveSavedTime);

			return sc;
		}
	};

	// -add by tangyetao   2020/05/11
	class mtSetClearParam : mtObject			// 设置图像清理参数的返回值
	{
		mtImageClearParam		m_startParam;						// 自动清理的开始（触发）条件
		mtImageClearParam		m_finishParam;						// 自动清理的结束条件
		shErrorCode				m_setResult;						// 设置清理参数的结果

	public
		mtSetClearParam()
			: base(0)
			, m_setResult(rc_ec_Failed)
		{
		}

		mtSetClearParam(mtImageClearParam startParam, mtImageClearParam finishParam, shErrorCode setResult)
			: base(0)
			, m_setResult(setResult)
		{
			m_startParam	= startParam;
			m_finishParam	= finishParam;
		}

		mtSetClearParam( mtSetClearParam  other)
			: mtObject(other)
			, m_setResult(other.m_setResult)
		{
			m_startParam	= other.m_startParam;
			m_finishParam	= other.m_finishParam;
		}

		mtSetClearParam(mtSetClearParam   other)
			: mtObject(other)
			, m_setResult(other.m_setResult)
		{
			m_startParam	= std::move(other.m_startParam);
			m_finishParam	= std::move(other.m_finishParam);
		}

		mtSetClearParam  operator = ( mtSetClearParam  other)
		{
			if (this !=  other)
			{
				base.operator=(other);
				m_setResult		= other.m_setResult;
				m_startParam	= other.m_startParam;
				m_finishParam	= other.m_finishParam;
			}

			return *this;
		}

		mtSetClearParam  operator = (mtSetClearParam   other)
		{
			if (this !=  other)
			{
				base.operator=(std::move(other));
				m_setResult		= other.m_setResult;
				m_startParam	= std::move(other.m_startParam);
				m_finishParam	= std::move(other.m_finishParam);
			}

			return *this;
		}


			shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(m_setResult);
			sc.serialize(m_startParam);
			sc.serialize(m_finishParam);

			return sc;
		}
	};*/

	// -add by tangyetao   2020/05/11
	public class mtSetClearParam : mtObject, shISerializeable                        // 图像清理参数结构体
	{
		bool m_bClearOpen = true;                      // 功能是否打开
		mtDiskSpace m_startClearDiskSpace;              // 当磁盘剩余容量到m_clearDiskSpace%时，开始自动清理
		mtDiskSpace m_finishClearDiskSpace;             // 当磁盘剩余容量到m_clearDiskSpace%时，结束自动清理
		mtReserveImageNum m_reserveImgNum;                  // 保留前m_reserveImgNum个图像数据
		mtReserveImageSavedTime m_reserveSavedTime;                 // 保留前m_reserveSavedTime天的图像数据
		emDeleteLevel m_emDeleteLevel = emDeleteLevel.emDeleteLevel_All;                  // 删除文件的级别

        public bool ClearOpen { get => m_bClearOpen; set => m_bClearOpen = value; }
        public mtDiskSpace StartClearDiskSpace { get => m_startClearDiskSpace; set => m_startClearDiskSpace = value; }
        public mtDiskSpace FinishClearDiskSpace { get => m_finishClearDiskSpace; set => m_finishClearDiskSpace = value; }
        public mtReserveImageNum ReserveImgNum { get => m_reserveImgNum; set => m_reserveImgNum = value; }
        public mtReserveImageSavedTime ReserveSavedTime { get => m_reserveSavedTime; set => m_reserveSavedTime = value; }
        public emDeleteLevel DeleteLevel { get => m_emDeleteLevel; set => m_emDeleteLevel = value; }

        public	mtSetClearParam()
				: base(0)
		{
		}

		public mtSetClearParam(bool bClearOpen, mtDiskSpace startClearDiskSpace, mtDiskSpace finishClearDiskSpace
			, mtReserveImageNum reserveImgNum, mtReserveImageSavedTime reserveSavedTime, emDeleteLevel nDeleteLevel, shErrorCode setResult)
				: base(0)

		{
			m_bClearOpen = bClearOpen;
			m_emDeleteLevel = nDeleteLevel;
			m_startClearDiskSpace = startClearDiskSpace;
			m_finishClearDiskSpace = finishClearDiskSpace;
			m_reserveImgNum = reserveImgNum;
			m_reserveSavedTime = reserveSavedTime;
		}

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_bClearOpen);
			sc.serialize(ref m_emDeleteLevel);
			sc.serialize(m_startClearDiskSpace);
			sc.serialize(m_finishClearDiskSpace);
			sc.serialize(m_reserveImgNum);
			sc.serialize(m_reserveSavedTime);
			return sc;
		}
	}
	/*-----------------------------------------图像删除使用的结构体------------------------------------------------*/
	// -add by tangyetao   2020/05/11
	public class mtImageDeleteLevel : mtObject, shISerializeable                          // 图像的删除级别
	{
		string m_strPrn;
		emDeleteLevel m_emDeleteLevel = emDeleteLevel.emDeleteLevel_All;                                  // 删除级别
		public			mtImageDeleteLevel()
				: base(0)                                          // 默认全部删除
		{
		}

		public mtImageDeleteLevel(string strPrn, emDeleteLevel nDeleteLevel)
				: base(0)

		{
			m_strPrn = strPrn;
			m_emDeleteLevel = nDeleteLevel;
		}

        public string Prn { get => m_strPrn; set => m_strPrn = value; }
        public emDeleteLevel DeleteLevel { get => m_emDeleteLevel; set => m_emDeleteLevel = value; }

        public bool AddLevel()
		{
			bool bAddResult = false;
			switch (m_emDeleteLevel)
			{
				case emDeleteLevel.emDeleteLevel_Unknown:
					{
						bAddResult = false;
					}
					break;

				case emDeleteLevel.emDeleteLevel_All:
					{
						bAddResult = false;
					}
					break;

				case emDeleteLevel.emDeleteLevel_ReserveRaw:
					{
						m_emDeleteLevel = emDeleteLevel.emDeleteLevel_All;
						bAddResult = true;
					}
					break;

				case emDeleteLevel.emDeleteLevel_Reservr2DAndRaw:
					{
						m_emDeleteLevel = emDeleteLevel.emDeleteLevel_ReserveRaw;
						bAddResult = true;
					}
					break;

				case emDeleteLevel.emDeleteLevel_Reserve3DAndRaw:
					{
						m_emDeleteLevel = emDeleteLevel.emDeleteLevel_Reservr2DAndRaw;
						bAddResult = true;
					}
					break;

				case emDeleteLevel.emDeleteLevel_Manual:
					{
						bAddResult = false;
					}
					break;

				default:
					{
						bAddResult = false;
					}
					break;
			}
			return bAddResult;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_strPrn);
			sc.serialize(ref m_emDeleteLevel);

			return sc;
		}
	}
	// -add by tangyetao   2020/05/11
	public class mtDeleteImageDemand : mtObject, shISerializeable                       // 自动清理图像请求
	{
		List<mtImageDeleteLevel> m_vecDeleteImageLevel = new List<mtImageDeleteLevel>();         // 文件的删除级别
		uint m_nSaveType = 0;                    // 保存类型，0代表自动，1代表手动，暂时没用到

		public
			mtDeleteImageDemand()
				: base(0)
		{
		}

		public mtDeleteImageDemand(List<mtImageDeleteLevel> vecDeleteImagePrn, uint nSaveType)
				: base(0)
		{
			m_vecDeleteImageLevel = vecDeleteImagePrn;
			m_nSaveType = nSaveType;
		}

        public List<mtImageDeleteLevel> DeleteImageLevel { get => m_vecDeleteImageLevel; set => m_vecDeleteImageLevel = value; }
        public uint SaveType { get => m_nSaveType; set => m_nSaveType = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nSaveType);
			sc.serialize(m_vecDeleteImageLevel);

			return sc;
		}
	}
	// -add by tangyetao   2020/05/11
	public class mtImageDeleteErrorCode : mtObject, shISerializeable                     // 图像删除的返回值
	{
		string m_strPrn;
		shErrorCode m_nDeleteErrorCode = shErrorCode.sh_ec_Success;                                 // 删除的返回值
		public
			mtImageDeleteErrorCode()
				: base(0)                           // 默认删除成功
		{
		}

		public mtImageDeleteErrorCode(string strPrn, shErrorCode nDeleteErrorCode)
				: base(0)

		{
			m_strPrn = strPrn;
			m_nDeleteErrorCode = nDeleteErrorCode;
		}

		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_strPrn);
			sc.serialize(ref m_nDeleteErrorCode);

			return sc;
		}
	};

	public class mtDeleteOutCome : mtObject, shISerializeable
	{
		string m_strPrn;
		emDeleteLevel m_emDeleteImageLevel = emDeleteLevel.emDeleteLevel_Unknown;            // 文件的删除级别
		shErrorCode m_errorCodeDeleteImage = shErrorCode.sh_ec_Success;         // 删除操作的返回值
		/*------------------------------
		XML
			第0位：".xml"文件；
			第1位: "_Judge.xml"文件
			第2-7位：保留位
		3D
			第8位：".hel "文件；
			第9位: ".csus "文件
			第10位：".rcn3"文件
			第11位："_3D.jpg"文件
			第12位："_SUS_3D.jpg"文件
			第13位："_CT.jpg"文件
			第14位："_SUS_CT.jpg"文件
			第15位：保留位
		2D
			第16位：".drg "文件；
			第17位: "_TSP.dri "文件
			第18位：".dsus"文件
			第19位："_TSP.jpg "文件
			第20位："_SUS_TSP.jpg "文件
			第21位："_DR.jpg "文件
			第22位："_SUS_DR.jpg"文件
			第23位：保留位
		原始数据
			第24位：".ori"文件；
			第25-31位：保留位
		保留位
			第32-63位：保留位
		------------------------------*/
		ulong m_nDataDeleteState = 0;             // 每种类型的数据的删除状态

		public	mtDeleteOutCome()
				: base(0)
		{
		}

		public mtDeleteOutCome(string strPrn, emDeleteLevel deleteImageLevel, shErrorCode errorCodeDeleteImage, ulong nDataExistState)
				: base(0)
		{
			m_strPrn = strPrn;
			m_emDeleteImageLevel = deleteImageLevel;
			m_errorCodeDeleteImage = errorCodeDeleteImage;
			m_nDataDeleteState = nDataExistState;
		}

        public string Prn { get => m_strPrn; set => m_strPrn = value; }
        public emDeleteLevel DeleteImageLevel { get => m_emDeleteImageLevel; set => m_emDeleteImageLevel = value; }
        public shErrorCode ErrorCode { get => m_errorCodeDeleteImage; set => m_errorCodeDeleteImage = value; }
        public ulong DataDeleteState { get => m_nDataDeleteState; set => m_nDataDeleteState = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_strPrn);
			sc.serialize(ref m_emDeleteImageLevel);
			sc.serialize(ref m_errorCodeDeleteImage);
			sc.serialize(ref m_nDataDeleteState);
			return sc;
		}
	}
	// -add by tangyetao   2020/05/11
	public class mtDeleteImageReply : mtObject, shISerializeable                                         // 删除图像返回值
	{
		List<mtDeleteOutCome> m_vecDeleteOutCome = new List<mtDeleteOutCome>();
		uint m_nSaveType = 0;                   // 暂时未使用

		public
			mtDeleteImageReply()
				: base(0)
		{
		}

		public mtDeleteImageReply(List<mtDeleteOutCome> vecDeleteOutCome, uint nSaveType)
				: base(0)

		{
			m_nSaveType = nSaveType;
			m_vecDeleteOutCome = vecDeleteOutCome;
		}

        public List<mtDeleteOutCome> DeleteOutCome { get => m_vecDeleteOutCome; set => m_vecDeleteOutCome = value; }

        public uint SaveType { get => m_nSaveType; set => m_nSaveType = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nSaveType);
			sc.serialize(m_vecDeleteOutCome);
			return sc;
		}
	};

	// -add by tangyetao   2020/05/11
	public class mtDeleteImageResult : mtObject, shISerializeable                             // 删除图像结果
	{
		List<mtDeleteOutCome> m_vecDeleteOutCome = new List<mtDeleteOutCome>();
		uint m_nSaveType = 0;                   // 暂时未使用

		public
			mtDeleteImageResult()
				: base(0)
		{
		}

		public mtDeleteImageResult(List<mtDeleteOutCome> vecDeleteOutCome, uint nSaveType)
				: base(0)

		{
			m_nSaveType=nSaveType;
			m_vecDeleteOutCome=vecDeleteOutCome;
		}

        public List<mtDeleteOutCome> DeleteOutCome { get => m_vecDeleteOutCome; set => m_vecDeleteOutCome = value; }
        public uint SaveType { get => m_nSaveType; set => m_nSaveType = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nSaveType);
			sc.serialize(m_vecDeleteOutCome);
			return sc;
		}
	}
	/*-----------------------------------------图像保存使用的结构体------------------------------------------------*/
	// -add by tangyetao   2020/05/11
	public class mtSaveImageRequest : mtObject, shISerializeable           // 保存图像请求
	{
		List<string> m_vecPrn = new List<string>();                 // 待保存图像的prn
		uint m_nSaveType = 0;               // 0自动保存， 1 手动保存

		public
			mtSaveImageRequest()
				: base(0)
		{
		}

		mtSaveImageRequest(List<string> vecPrn, uint nSaveType)
				: base(0)
		{
			m_vecPrn = vecPrn;
			m_nSaveType = nSaveType;
		}

        public List<string> Prns { get => m_vecPrn; set => m_vecPrn = value; }
        public uint SaveType { get => m_nSaveType; set => m_nSaveType = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nSaveType);
			sc.serialize(ref m_vecPrn);

			return sc;
		}
	}
	// -add by tangyetao   2020/05/11
	public class mtImageSaveErrorCode : mtObject, shISerializeable                // 图像保存的返回值
	{
		string m_strPrn;
		shErrorCode m_nSaveErrorCode = shErrorCode.sh_ec_Success;                                   // 保存的返回值
		public	mtImageSaveErrorCode()
				: base(0)                           // 默认保存成功
		{
		}

		public mtImageSaveErrorCode(string strPrn, shErrorCode nDeleteErrorCode)
				: base(0)

		{
			m_strPrn = strPrn;
			m_nSaveErrorCode=nDeleteErrorCode;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_strPrn);
			sc.serialize(ref m_nSaveErrorCode);

			return sc;
		}
	};

	// -add by tangyetao   2020/05/11
	public class mtSaveImageResponse : mtObject, shISerializeable                              // 保存图像返回值
	{
		List<mtImageSaveErrorCode> m_vecSaveImageErrorCode = new List<mtImageSaveErrorCode>();             // 保存操作的返回值

		public
			mtSaveImageResponse()
				: base(0)
		{
		}

		mtSaveImageResponse(List<mtImageSaveErrorCode> vecSaveImageErrorCode)
				: base(0)
		{
			m_vecSaveImageErrorCode = vecSaveImageErrorCode;
		}




		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(m_vecSaveImageErrorCode);

			return sc;
		}
	};

	// -add by tangyetao   2020/05/11
	public class mtImageSaveOutcome : mtObject, shISerializeable                   // 图像的保存结果
	{
		string m_strPrn;
		emSaveImageConsequence m_emSaveImageConsequence = emSaveImageConsequence.emSaveImageConsequence_Unknown;            // 保存结果，枚举类型emSaveImageResult
		public
			mtImageSaveOutcome()
				: base(0)                                     // 默认保存成功
		{
		}

		public mtImageSaveOutcome(string strPrn, emSaveImageConsequence nSaveImageResult)
				: base(0)
		{
			m_strPrn = strPrn;
			m_emSaveImageConsequence = nSaveImageResult;
		}

        public string Prn { get => m_strPrn; set => m_strPrn = value; }
        public emSaveImageConsequence SaveImageConsequence { get => m_emSaveImageConsequence; set => m_emSaveImageConsequence = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_strPrn);
			sc.serialize(ref m_emSaveImageConsequence);

			return sc;
		}
	}
	// -add by tangyetao   2020/05/11
	public class mtSaveImageResult : mtObject, shISerializeable                             // 手动保存图像结果
	{
		List<mtImageSaveOutcome> m_vecImageSaveOutcome = new List<mtImageSaveOutcome>();         // 手动保存图像结果

		public
			mtSaveImageResult()
				: base(0)
		{
		}

		mtSaveImageResult(List<mtImageSaveOutcome> vecImageSaveOutcome)
				: base(0)
		{
			m_vecImageSaveOutcome = vecImageSaveOutcome;
		}

        public List<mtImageSaveOutcome> ImageSaveOutcome { get => m_vecImageSaveOutcome; set => m_vecImageSaveOutcome = value; }

        public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(m_vecImageSaveOutcome);

			return sc;
		}
	}
	// 每个包裹的时间结构体，由年月日+日文件夹下的第几个的序号构成，例如d:\ACCT\Image\NUCTECH001\2019\0109\000027这个文件夹对应的分别为2019、01、09、000027
	public class mtPackageFileTime : mtObject, shISerializeable
	{
		uint m_nYear = 0;                       // 年
		uint m_nMonth = 0;                       // 月
		uint m_nDay = 0;                         // 日
		uint m_nIndex = 0;                        // 序号
		public
			mtPackageFileTime()
				: base(0)
		{ 
		}

	public mtPackageFileTime(uint nYear, uint nMonth, uint nDay, uint nIndex)
				: base(0)

	{
		m_nYear = nYear;
		m_nMonth = nMonth;
		m_nDay = nDay;
		m_nIndex = nIndex;
		}

		// 获取天数差
		//int GetDayDiff(time_t ttNow)
		//{
		//	tm mFileTime;
		//	mFileTime.tm_year = m_nYear - 1900;
		//	mFileTime.tm_mon = m_nMonth;
		//	mFileTime.tm_mday = m_nDay;
		//	time_t mttFileTime = mktime(mFileTime);

		//	return (int)((ttNow - mttFileTime) / (60 * 60 * 24));
		//}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_nYear);
			sc.serialize(ref m_nMonth);
			sc.serialize(ref m_nDay);
			sc.serialize(ref m_nIndex);

			return sc;
		}
	};

	public class mtFilePathAndTime : mtObject, shISerializeable
	{
		string m_strPrn;
		string m_strPath;                     // prn对应图像文件的路径，到日期下的第几个文件夹就行
		mtPackageFileTime m_packageFileTime = new mtPackageFileTime();                // 文件信息
		public
			mtFilePathAndTime()
				: base(0)
		{
		}

		public mtFilePathAndTime(string strPrn, string strPath, mtPackageFileTime packageFileTime)
				: base(0)

		{
			m_strPrn = strPrn;
			m_strPath = strPath;
			m_packageFileTime = packageFileTime;
		}


		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);
			sc.serialize(ref m_strPrn);
			sc.serialize(ref m_strPath);
			sc.serialize( m_packageFileTime);

			return sc;
		}
	};

	// RCS 站点的信息，用来传递设备id等。 如果后期要改，可以直接在这里面修改
	public class mtRCSInfo : mtObject, shISerializeable
	{
		public
			mtRCSInfo()
				: base(0)
		{
		}



		public new shISerializer serialize(shISerializer sc)
		{
			base.serialize(sc);

			return sc;
		}
	};


}
